home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Gigarom 1
/
Gigarom Macintosh Archives (Quantum Leap)(CDRM1080320)(1993).iso
/
FILES
/
APP
/
A-D
/
Alpha.4.01.cpt
/
Alpha.4.01.rsrc
/
STR#_130.txt
< prev
next >
Wrap
Text File
|
1991-10-22
|
6KB
|
307 lines
accessed from the title bar of any text window.
If 'showRowCol' is on, both of the popup menus can be
mark in any window.
The 'gotoMark' function still allows you to go to any
of all currently defined marks in the current window.
Clicking while depressing the command key pops up a menu
'sortedIsDefault' var reverses these semantics.
the methods menu is sorted alphanumerically. The
'control' key. If the 'shift' key is depressed as well,
clicking in a text window while holding down the
the definition of that function. The menu is called by
Selecting an item from this menu immediately displays
may need to play with the definition for 'funcExpr'.
is very different than mine. If this is the case, you
to pick up all function definitions if your coding style
above, using regular expressions this way is not going
function definitions in the current file. As noted
string variable 'funcExpr' to create a popup menu of all
Alpha also uses the regular expression defined by the
Popup Function Menus
chosen.
corresponding end of the buffer (beginning or end) is
If no match of the bound expressions occurs, the
LaTex.
'AlphaBits' file for the regular expressions used for
paragraph, as opposed to the above default case. See the
case, what we are searching for is actually part of the
backslash to be the first line of a paragraph. In this
In LaTex, we would like a line beginning with a
Things become more complicated, for instance with LaTex.
consisting of only spaces and tabs.
These values assume paragraphs are delimited by lines
"\r[ \t]*"
and the corresponding 'paraEnd' is:
"[ \t].*\r"
default 'paraBegin' value:
determination to be customized. The following is the
While a little convoluted, this method allows paragraph
selects the line of the first character matched.
searching for the last line of a paragraph, Alpha
selects the line of the last character matched. When
When searching for the first line of a paragraph, Alpha
from the string variables 'paraBegin' and 'paraEnd'.
the current position. The pattern searched for is drawn
regular expression searches forward and backward from
The boundaries of the paragraphs are determined by
Alpha has several routines which manipulate paragraphs.
identified.
Pascal procedures w/ or w/o parameters can be
line, the last word in the line is used. Therefore,
the function's name. If there is no '(' in the selected
word previous to the first '(' in the selected line as
bear in mind is that the tag routines use the complete
tags for other languages. The only thing you need to
of 'C' declarations, you could also use it to generate
Note that not only can you customize this to your style
be a set of parenthesis.
other than '\t', '#', '\r', '/', ' ', or '@'. There must
take up an entire line. It must begin with a character
wade through it. The string that we are looking for must
complicated, this expression makes sense if you slowly
'?' after the last right parenthesis.) Although
method definitions. To pick them up, add a question mark
(NOTE: the above expressions won't pick up many C++
^[^ \t#\r/@][^\r]*\([^\r]*\)$
C function declarations:
currently uses the following regular expression to find
can change " funcExpr" to suit your own style. Alpha
the text. If you declare your functions differently, you
function declarations. In other words, we don't parse
expression in the string variable "funcExpr" to look for
ALPHA's tag generating routines use the regular
tag file specified by the "tagFile" string variable.
functions. When searching for a tag, ALPHA looks for the
ALPHA supports the use of tags to find declarations of
they the following section shows how useful they can be.
Regular expressions can be very difficult to master, but
(aa|bb)box
'aabox' or 'bbbox':
The following regular expression will match either
EXAMPLE:
the matched text.
parenthesis that includes the nth left paren is denoted
substitution. The substring delimited by the pair of
matched string that can be used either later during
The parenthesis also define substrings of the total
can be concatenated to create larger expressions.
Regular expressions constructed from the above elements
(...) The interior elements are grouped together.
matches either 'pete' or 'bob'.
expressions is limited. Ex: (pete|bob)
parenthesis, the extent of the alternated
a|b matches either a or b. If enclosed in
pattern. Ex: 'ab?' matches 'a' or 'ab'.
? zero or one occurrences of the previous
pattern.
+ one or more occurrences of the previous
'abbb' etc.
pattern. Ex: 'ab*' matches 'a', 'ab', 'abb',
* zero or more occurrences of the previous
\r carriage return or line break.
\t tab.
by putting it immediately after the '^'.
the enclosed characters. ']' can be included
[^...] negated character class, matches anything but
'c', '0', '1', or '2'.
enclosed choices. Ex: '[ac0-2]' matches 'a',
inside classes. Matches one character of the
[...] character class, can use ranges such as '0-9'.
. any character except carriage return.
$ end of line.
^ beginning of line.
c literal char.
from the following elements:
regular expressions. Regular expressions are constructed
ALPHA can now search for patterns constructed from full
Using Regular Expressions